package com.rtx.api.utils;

/**
 * 字符串处理
 */
public class RtxStringUtils {

    /**
     * 截取字符串
     * @param source
     * @param length
     * @return
     */
    public static String subString(String source,int length) {
        if(source == null){
            return null;
        }
        if("".equals(source.trim())){
            return null;
        }
        if(source.length() < length){
            return source;
        }
        return source.substring(0,length);
    }
}
